package com.neusoft.license.api.interceptor;

import com.neusoft.license.api.license.LicenseVerify;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author: xlh
 * @Description: license检查器
 * @Date: Create in 17:13 2020/9/17 0017
 */
@Slf4j
@Component
public class LicenseInterceptor extends HandlerInterceptorAdapter {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        LicenseVerify licenseVerify = new LicenseVerify();
        //校验License
        licenseVerify.verify();
        return true;
    }
}
